﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace KinnectInput.KinectMetro
{
    public static class MenuStyle
    {
        public static GraphicsDevice graphicsDevice { get; set; }
        public static Color BackGroundColor
        {
            get
            {
                return Color.Red;
            }
        }
        static Texture2D _buttonBackground;
        public static Texture2D ButtonBackGround
        {
            get 
            {
                if (_buttonBackground == null)
                {
                    _buttonBackground = buildTexture(BackGroundColor);
                }
                return _buttonBackground;
            }

        }
        private static Texture2D buildTexture(Color tex)
        {
            int width = MenuItemSizes.SquareButton.Width;
            int height = MenuItemSizes.SquareButton.Height;
            Texture2D returnTex = new Texture2D(graphicsDevice, width, height);
            Color[] texColor = new Color[width * height];
            for (int i = 0; i < texColor.Length; i++)
            {
                texColor[i] = BackGroundColor;
            }
            returnTex.SetData(texColor);
            return returnTex;
        }
    }
}
